package com.zs.blog.controller;

import com.zs.blog.model.ResponseResult;
import com.zs.blog.model.vo.MenuLabelListVO;
import com.zs.blog.service.IMenuService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Title: MenuContoller
 * @Author zs
 * @Package com.zs.blog.controller
 * @Date 2025/8/25 22:45
 * @description: 菜单接口层
 */
@RestController
public class MenuController {

    public IMenuService menuService;

    @Autowired
    public MenuController(IMenuService menuService){
        this.menuService = menuService;
    }


    @GetMapping("/admin/menu/level/list")
    @Operation(summary = "获取菜单层级信息列表")
    public ResponseResult<List<MenuLabelListVO>> listMenuLevelInfo(){
        List<MenuLabelListVO> listMenuLevel = menuService.listMenuLevelInfo();
        return ResponseResult.success(listMenuLevel);
    }
}
